package com.wan.service.impl;

import com.wan.dao.RoleMapper;
import com.wan.pojo.Role;
import com.wan.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;
    public List<Role> getRoleList(Map<String, Object> queryMap) {
        return roleMapper.getRoleList(queryMap);
    }

    public int getTotal(Map<String,Object> queryMap) {
        return roleMapper.getTotal( queryMap);
    }

    public int add(Role role) {
        return roleMapper.add(role);
    }

    public int edit(Role role) {
        return roleMapper.edit(role);
    }

    public int delete(Long id) {
        return roleMapper.delete(id);
    }

    public Role findById(Long id) {
        return roleMapper.findById(id);
    }
}
